<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	request.setAttribute("basePath", basePath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="${basePath}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<style type="text/css">
html, body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	text-align: center;
	font-family: 微软雅黑;
	font-size: 15px;
}
.backgroundDiv{
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: -1;
}
.contentDiv {
	width: 960px;
	margin: 0 auto;
}
.contentDiv .seachDiv {
	background-color: rgba(255, 255, 255, 0.7);
	padding: 10px;
	border-style:solid;
	border-color: black;
}
.backgroundDiv img { width: 100%; height: 100%;}
.contentDiv .resultDiv{
	background-color: rgba(255, 255, 255, 0.5);
	padding: 10px;
}
table {
	border: 0px silver solid; 
	margin-top: 20px;
	width: 100%;
}
table tr {
	height: 25	px;
	border: 1px silver solid;
	border-color: blue;
}
table tr th, table tr td {
	border: 1px silver solid;
	border-color: blue;
}
</style>
<body>
<div class="backgroundDiv">
		<img src="/picture/back5.jpg"/>
</div>
<div class="contentDiv">
	<div class="seachDiv">
	<form action="record/Record_find" method="post">
		<p>
			<label for="bookNo">书号：</label>	
			<input id="bookNo" name="recordDTO.bookNo" class="inputText" type="text"/>
			<label for="operateType">操作：</label>
			<select id="operateType" name="recordDTO.operateType">
				 <option value="0" selected="selected"></option>
				 <option value="1">借出</option>
			 	 <option value="2">归还</option>
			</select>
		</p>
		<p>
			<input type="submit" value="查询" style="cursor:pointer">
			<input type="reset" value="重置" style="cursor:pointer">
			<a href="book.jsp">返回</a>
		</p>
	</form>
	
	</div>
	
	<div class="resultDiv">
		<table>
			<tr>
				<th>借书人账号</th>
				<th>书号</th>
				<th>书名</th>
				<th>操作时间</th>
				<th>操作类型</th>
			</tr>
			<s:if test="records != null">
				<s:iterator value="records" var="record">
					<tr>
						<td><s:property value="#record.user.userName"></s:property></td>
						<td><s:property value="#record.book.bookNo"></s:property></td>
						<td><s:property value="#record.book.bookName"></s:property></td>
						<td><s:property value="#record.operateTime.time.year + 1900"/>年<s:property value="#record.operateTime.time.month + 1"/>月<s:property value="#record.operateTime.time.date"/>日</td>
						<s:if test="#record.operateType == 1"><td>借出</td></s:if>
						<s:if test="#record.operateType == 2"><td>归还</td></s:if>
					</tr>
				</s:iterator>
			</s:if>
		</table>
	</div>

</div>

</body>
</html>